Integrand size = 19, antiderivative size = 161 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=\frac {4 a b \cos (c+d x)}{d^3}-\frac {120 b^2 x \cos (c+d x)}{d^5}-\frac {2 a b x^2 \cos (c+d x)}{d}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}-\frac {b^2 x^5 \cos (c+d x)}{d}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {120 b^2 \sin (c+d x)}{d^6}+\frac {4 a b x \sin (c+d x)}{d^2}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}+a^2 \cos (c) \text {Si}(d x) \]
[Out]
Time = 0.16 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3420, 3384, 3380, 3383, 3377, 2718, 2717} \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=a^2 \sin (c) \operatorname {CosIntegral}(d x)+a^2 \cos (c) \text {Si}(d x)+\frac {4 a b \cos (c+d x)}{d^3}+\frac {4 a b x \sin (c+d x)}{d^2}-\frac {2 a b x^2 \cos (c+d x)}{d}+\frac {120 b^2 \sin (c+d x)}{d^6}-\frac {120 b^2 x \cos (c+d x)}{d^5}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}-\frac {b^2 x^5 \cos (c+d x)}{d} \]
[In]
[Out]
Rule 2717
Rule 2718
Rule 3377
Rule 3380
Rule 3383
Rule 3384
Rule 3420
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a^2 \sin (c+d x)}{x}+2 a b x^2 \sin (c+d x)+b^2 x^5 \sin (c+d x)\right ) \, dx \\ & = a^2 \int \frac {\sin (c+d x)}{x} \, dx+(2 a b) \int x^2 \sin (c+d x) \, dx+b^2 \int x^5 \sin (c+d x) \, dx \\ & = -\frac {2 a b x^2 \cos (c+d x)}{d}-\frac {b^2 x^5 \cos (c+d x)}{d}+\frac {(4 a b) \int x \cos (c+d x) \, dx}{d}+\frac {\left (5 b^2\right ) \int x^4 \cos (c+d x) \, dx}{d}+\left (a^2 \cos (c)\right ) \int \frac {\sin (d x)}{x} \, dx+\left (a^2 \sin (c)\right ) \int \frac {\cos (d x)}{x} \, dx \\ & = -\frac {2 a b x^2 \cos (c+d x)}{d}-\frac {b^2 x^5 \cos (c+d x)}{d}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {4 a b x \sin (c+d x)}{d^2}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}+a^2 \cos (c) \text {Si}(d x)-\frac {(4 a b) \int \sin (c+d x) \, dx}{d^2}-\frac {\left (20 b^2\right ) \int x^3 \sin (c+d x) \, dx}{d^2} \\ & = \frac {4 a b \cos (c+d x)}{d^3}-\frac {2 a b x^2 \cos (c+d x)}{d}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}-\frac {b^2 x^5 \cos (c+d x)}{d}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {4 a b x \sin (c+d x)}{d^2}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}+a^2 \cos (c) \text {Si}(d x)-\frac {\left (60 b^2\right ) \int x^2 \cos (c+d x) \, dx}{d^3} \\ & = \frac {4 a b \cos (c+d x)}{d^3}-\frac {2 a b x^2 \cos (c+d x)}{d}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}-\frac {b^2 x^5 \cos (c+d x)}{d}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {4 a b x \sin (c+d x)}{d^2}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}+a^2 \cos (c) \text {Si}(d x)+\frac {\left (120 b^2\right ) \int x \sin (c+d x) \, dx}{d^4} \\ & = \frac {4 a b \cos (c+d x)}{d^3}-\frac {120 b^2 x \cos (c+d x)}{d^5}-\frac {2 a b x^2 \cos (c+d x)}{d}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}-\frac {b^2 x^5 \cos (c+d x)}{d}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {4 a b x \sin (c+d x)}{d^2}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}+a^2 \cos (c) \text {Si}(d x)+\frac {\left (120 b^2\right ) \int \cos (c+d x) \, dx}{d^5} \\ & = \frac {4 a b \cos (c+d x)}{d^3}-\frac {120 b^2 x \cos (c+d x)}{d^5}-\frac {2 a b x^2 \cos (c+d x)}{d}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}-\frac {b^2 x^5 \cos (c+d x)}{d}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {120 b^2 \sin (c+d x)}{d^6}+\frac {4 a b x \sin (c+d x)}{d^2}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}+a^2 \cos (c) \text {Si}(d x) \\ \end{align*}
Time = 0.35 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.67 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=-\frac {b \left (2 a d^2 \left (-2+d^2 x^2\right )+b x \left (120-20 d^2 x^2+d^4 x^4\right )\right ) \cos (c+d x)}{d^5}+a^2 \operatorname {CosIntegral}(d x) \sin (c)+\frac {b \left (4 a d^4 x+5 b \left (24-12 d^2 x^2+d^4 x^4\right )\right ) \sin (c+d x)}{d^6}+a^2 \cos (c) \text {Si}(d x) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.43 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.11
method | result | size |
risch | \(-\frac {b^{2} x^{5} \cos \left (d x +c \right )}{d}+\frac {5 b^{2} x^{4} \sin \left (d x +c \right )}{d^{2}}-\frac {i a^{2} {\mathrm e}^{-i c} \operatorname {Ei}_{1}\left (i d x \right )}{2}+\frac {i a^{2} {\mathrm e}^{i c} \operatorname {Ei}_{1}\left (-i d x \right )}{2}-\frac {2 a b \,x^{2} \cos \left (d x +c \right )}{d}+\frac {20 b^{2} x^{3} \cos \left (d x +c \right )}{d^{3}}+\frac {4 a b x \sin \left (d x +c \right )}{d^{2}}-\frac {60 b^{2} x^{2} \sin \left (d x +c \right )}{d^{4}}+\frac {4 a b \cos \left (d x +c \right )}{d^{3}}-\frac {120 b^{2} x \cos \left (d x +c \right )}{d^{5}}+\frac {120 b^{2} \sin \left (d x +c \right )}{d^{6}}\) | \(178\) |
meijerg | \(\frac {32 b^{2} \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {15}{4 \sqrt {\pi }}+\frac {\left (\frac {15}{8} d^{4} x^{4}-\frac {45}{2} d^{2} x^{2}+45\right ) \cos \left (d x \right )}{12 \sqrt {\pi }}+\frac {x d \left (\frac {3}{8} d^{4} x^{4}-\frac {15}{2} d^{2} x^{2}+45\right ) \sin \left (d x \right )}{12 \sqrt {\pi }}\right )}{d^{6}}+\frac {32 b^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {x d \left (\frac {7}{8} d^{4} x^{4}-\frac {35}{2} d^{2} x^{2}+105\right ) \cos \left (d x \right )}{28 \sqrt {\pi }}+\frac {\left (\frac {35}{8} d^{4} x^{4}-\frac {105}{2} d^{2} x^{2}+105\right ) \sin \left (d x \right )}{28 \sqrt {\pi }}\right )}{d^{6}}+\frac {8 a b \sqrt {\pi }\, \sin \left (c \right ) \left (\frac {x \left (d^{2}\right )^{\frac {3}{2}} \cos \left (d x \right )}{2 \sqrt {\pi }\, d^{2}}-\frac {\left (d^{2}\right )^{\frac {3}{2}} \left (-\frac {3 d^{2} x^{2}}{2}+3\right ) \sin \left (d x \right )}{6 \sqrt {\pi }\, d^{3}}\right )}{d^{2} \sqrt {d^{2}}}+\frac {8 a b \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\left (-\frac {d^{2} x^{2}}{2}+1\right ) \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {d x \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{3}}+\frac {a^{2} \sqrt {\pi }\, \sin \left (c \right ) \left (\frac {2 \gamma +2 \ln \left (x \right )+\ln \left (d^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{2}+a^{2} \cos \left (c \right ) \operatorname {Si}\left (d x \right )\) | \(327\) |
derivativedivides | \(a^{2} \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )-\frac {6 a b \,c^{2} \cos \left (d x +c \right )}{d^{3}}-\frac {6 a b c \left (c +1\right ) \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {2 \left (c^{2}+c +1\right ) a b \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}+\frac {6 b^{2} c^{5} \cos \left (d x +c \right )}{d^{6}}+\frac {15 \left (c +1\right ) b^{2} c^{4} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}-\frac {20 b^{2} c^{3} \left (c^{2}+c +1\right ) \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}+\frac {15 \left (c^{3}+c^{2}+c +1\right ) b^{2} c^{2} \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}-\frac {6 b^{2} c \left (c^{4}+c^{3}+c^{2}+c +1\right ) \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}+\frac {\left (c^{5}+c^{4}+c^{3}+c^{2}+c +1\right ) b^{2} \left (-\left (d x +c \right )^{5} \cos \left (d x +c \right )+5 \left (d x +c \right )^{4} \sin \left (d x +c \right )+20 \left (d x +c \right )^{3} \cos \left (d x +c \right )-60 \left (d x +c \right )^{2} \sin \left (d x +c \right )+120 \sin \left (d x +c \right )-120 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}\) | \(487\) |
default | \(a^{2} \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )-\frac {6 a b \,c^{2} \cos \left (d x +c \right )}{d^{3}}-\frac {6 a b c \left (c +1\right ) \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {2 \left (c^{2}+c +1\right ) a b \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}+\frac {6 b^{2} c^{5} \cos \left (d x +c \right )}{d^{6}}+\frac {15 \left (c +1\right ) b^{2} c^{4} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}-\frac {20 b^{2} c^{3} \left (c^{2}+c +1\right ) \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}+\frac {15 \left (c^{3}+c^{2}+c +1\right ) b^{2} c^{2} \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}-\frac {6 b^{2} c \left (c^{4}+c^{3}+c^{2}+c +1\right ) \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{6}}+\frac {\left (c^{5}+c^{4}+c^{3}+c^{2}+c +1\right ) b^{2} \left (-\left (d x +c \right )^{5} \cos \left (d x +c \right )+5 \left (d x +c \right )^{4} \sin \left (d x +c \right )+20 \left (d x +c \right )^{3} \cos \left (d x +c \right )-60 \left (d x +c \right )^{2} \sin \left (d x +c \right )+120 \sin \left (d x +c \right )-120 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{6}}\) | \(487\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.80 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=\frac {a^{2} d^{6} \operatorname {Ci}\left (d x\right ) \sin \left (c\right ) + a^{2} d^{6} \cos \left (c\right ) \operatorname {Si}\left (d x\right ) - {\left (b^{2} d^{5} x^{5} + 2 \, a b d^{5} x^{2} - 20 \, b^{2} d^{3} x^{3} - 4 \, a b d^{3} + 120 \, b^{2} d x\right )} \cos \left (d x + c\right ) + {\left (5 \, b^{2} d^{4} x^{4} + 4 \, a b d^{4} x - 60 \, b^{2} d^{2} x^{2} + 120 \, b^{2}\right )} \sin \left (d x + c\right )}{d^{6}} \]
[In]
[Out]
Time = 3.69 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.29 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=a^{2} \sin {\left (c \right )} \operatorname {Ci}{\left (d x \right )} + a^{2} \cos {\left (c \right )} \operatorname {Si}{\left (d x \right )} + 2 a b x^{2} \left (\begin {cases} x \sin {\left (c \right )} & \text {for}\: d = 0 \\- \frac {\cos {\left (c + d x \right )}}{d} & \text {otherwise} \end {cases}\right ) - 4 a b \left (\begin {cases} \frac {x^{3} \sin {\left (c \right )}}{3} & \text {for}\: d = 0 \\- \frac {\begin {cases} \frac {x \sin {\left (c + d x \right )}}{d} + \frac {\cos {\left (c + d x \right )}}{d^{2}} & \text {for}\: d \neq 0 \\\frac {x^{2} \cos {\left (c \right )}}{2} & \text {otherwise} \end {cases}}{d} & \text {otherwise} \end {cases}\right ) + b^{2} x^{5} \left (\begin {cases} x \sin {\left (c \right )} & \text {for}\: d = 0 \\- \frac {\cos {\left (c + d x \right )}}{d} & \text {otherwise} \end {cases}\right ) - 5 b^{2} \left (\begin {cases} \frac {x^{6} \sin {\left (c \right )}}{6} & \text {for}\: d = 0 \\- \frac {\begin {cases} \frac {x^{4} \sin {\left (c + d x \right )}}{d} + \frac {4 x^{3} \cos {\left (c + d x \right )}}{d^{2}} - \frac {12 x^{2} \sin {\left (c + d x \right )}}{d^{3}} - \frac {24 x \cos {\left (c + d x \right )}}{d^{4}} + \frac {24 \sin {\left (c + d x \right )}}{d^{5}} & \text {for}\: d \neq 0 \\\frac {x^{5} \cos {\left (c \right )}}{5} & \text {otherwise} \end {cases}}{d} & \text {otherwise} \end {cases}\right ) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 5.68 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.91 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=\frac {{\left (a^{2} {\left (-i \, {\rm Ei}\left (i \, d x\right ) + i \, {\rm Ei}\left (-i \, d x\right )\right )} \cos \left (c\right ) + a^{2} {\left ({\rm Ei}\left (i \, d x\right ) + {\rm Ei}\left (-i \, d x\right )\right )} \sin \left (c\right )\right )} d^{6} - 2 \, {\left (b^{2} d^{5} x^{5} + 2 \, a b d^{5} x^{2} - 20 \, b^{2} d^{3} x^{3} - 4 \, a b d^{3} + 120 \, b^{2} d x\right )} \cos \left (d x + c\right ) + 2 \, {\left (5 \, b^{2} d^{4} x^{4} + 4 \, a b d^{4} x - 60 \, b^{2} d^{2} x^{2} + 120 \, b^{2}\right )} \sin \left (d x + c\right )}{2 \, d^{6}} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.34 (sec) , antiderivative size = 921, normalized size of antiderivative = 5.72 \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {\left (a+b x^3\right )^2 \sin (c+d x)}{x} \, dx=\int \frac {\sin \left (c+d\,x\right )\,{\left (b\,x^3+a\right )}^2}{x} \,d x \]
[In]
[Out]